package com.xhl.service.impl;

import com.xhl.entity.Article;
import com.xhl.service.ArticleClientService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class ArticleClientServiceFallbackFactory   implements FallbackFactory<ArticleClientService> {
    @Override
    public ArticleClientService create(Throwable cause) {
        return new ArticleClientService() {
            @Override
            public List<Article> queryArticleAll() {
                return new ArrayList<>();
            }
        };
    }
}
